class CreatePeople < ActiveRecord::Migration
  def self.up
    create_table :people do |t|
      t.string   :uid,             :limit => 50,        :null => false
      t.string   :name,            :limit => 60
      t.string   :email,           :limit => 70
      t.string   :photo_url
      t.string   :link
      t.string   :login,           :limit => 60
      t.string   :gender,          :limit => 10
      t.string   :token
      t.integer  :answers_count,   :limit => 1, :default => 0
      
      t.timestamps
    end
    
    add_index :people, :uid
  end

  def self.down
    drop_table :people
  end
end
